package durak;

import FrenchCards.FrenchCardInfo;
import FrenchCards.FrenchCardRank;
import FrenchCards.FrenchCardSuit;
import cards.CardState;

public class DurakDeckBuilder {

	public DurakDeck build()
	{
		DurakDeck deck = new DurakDeck(36);
		FrenchCardRank[] ranks = new FrenchCardRank[9];
		System.arraycopy(FrenchCardRank.values(), 4, ranks, 0, 9);
		
		for (FrenchCardSuit suit : FrenchCardSuit.values())
			for (FrenchCardRank rank : ranks)
			{
				FrenchCardInfo info = new FrenchCardInfo();
				info.suit = suit;
				info.rank = rank;
				deck.putToTop(new DurakCard(CardState.FaceDown, info));
			}
		return deck;
	}
}
